<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/jsp/common/taglib.jsp"%>
<div class="col-sm-12">
	<div class="content-15">
		<div class="col-sm-12 header lighter no-pading-top no-margin-top">
		    <h5 class="no-margin-top col-sm-4 col-xs-4 no-margin-bottom no-padding-left" style="line-height: 40px">${table.comment!}信息</h5>
		    <div class="col-xs-7 col-sm-7 text-right">
		    	<button id="edit${entity}InfoButton" class="btn btn-info no-margin-bottom" type="button" onclick="${entity?uncap_first}Edit()">
                 	编辑
            	</button>
				<button id="list${entity}InfoButton" class="btn btn-info no-margin-bottom" type="button" onclick="${entity?uncap_first}List()">
					返回
				</button>
		    </div>
        </div>
		<div class="row">
	        <form class="form-horizontal" role="form">
				<#list table.fields as field>
	        	<div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right no-padding-left"> ${field.comment!}</label>
                    <div class="col-sm-9">
                       <div class="no-padding">
                           <label class="control-label aling-left" style="padding-top: 5px;">
							   <#if field.type == 'date'><fmt:formatDate value="${r'$'}{${entity?uncap_first}.${field.propertyName}}" pattern="yyyy-MM-dd"/><#elseif field.type == 'datetime' || field.type == 'timestamp'><fmt:formatDate value="${r'$'}{${entity?uncap_first}.${field.propertyName}}" pattern="yyyy-MM-dd HH:mm:ss"/><#else>${r'$'}{${entity?uncap_first}.${field.propertyName}}</#if>
                           </label>
                       </div>
                     </div>
                </div>
				</#list>
	        </form>
		</div>
	</div>
</div>
<script type="text/javascript">
	$(function(){
		$("input").keydown(function(event){
			 if(event.keyCode==13){
				 event.keyCode=0;
				 return false;	
			 }
		 });
	});
	
	function ${entity?uncap_first}Edit(){
		loadOther("${r'$'}{ctx}<#if package.ModuleName??>/${package.ModuleName}</#if>/<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.entityPath}</#if>/edit.action?<#list table.fields as field><#if field.keyFlag>${field.propertyName}</#if></#list>=${r'$'}{${entity?uncap_first}.<#list table.fields as field><#if field.keyFlag>${field.propertyName}</#if></#list>}");
	}

	function ${entity?uncap_first}List(){
		loadOther("${r'$'}{ctx}<#if package.ModuleName??>/${package.ModuleName}</#if>/<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.entityPath}</#if>/index.action?isCacheSearchParams=true");
	}
</script>
